import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '兑换码字符串',
    align: "center",
    dataIndex: 'code'
  },
  {
    title: '可兑换天数',
    align: "center",
    dataIndex: 'days'
  },
  {
    title: '状态(0-未使用,1-已使用,2-已过期)',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '生成时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '兑换码自身有效期',
    align: "center",
    dataIndex: 'expireTime'
  },
  {
    title: '绑定用户ID',
    align: "center",
    dataIndex: 'userId_dictText'
  },
  {
    title: '兑换时间',
    align: "center",
    dataIndex: 'useTime'
  },
];

// 高级查询数据
export const superQuerySchema = {
  code: {title: '兑换码字符串',order: 0,view: 'text', type: 'string',},
  days: {title: '可兑换天数',order: 1,view: 'number', type: 'number',},
  status: {title: '状态(0-未使用,1-已使用,2-已过期)',order: 2,view: 'number', type: 'number',dictCode: 'code_state',},
  createTime: {title: '生成时间',order: 3,view: 'datetime', type: 'string',},
  expireTime: {title: '兑换码自身有效期',order: 4,view: 'datetime', type: 'string',},
  userId: {title: '绑定用户ID',order: 5,view: 'list', type: 'string',dictTable: "t_user", dictCode: 'id', dictText: 'phone',},
  useTime: {title: '兑换时间',order: 6,view: 'datetime', type: 'string',},
};
